
import request from "./request";


//注册
export function register (data) {
    return request(
        {
            url: "/login/register",
            method: "post",
            data,
        }

    );
}

//登录
export function login (data) {
    return request(
        {
            url: "/login/index",
            method: "post",
            data,
        }

    );
}

//忘记密码
export function resetpassword (data) {
    return request(
        {
            url: "/login/resetpassword",
            method: "post",
            data,
        }

    );
}

//客户状态
export function userStatus (data) {
    return request(
        {
            url: "/login/user_status",
            method: "post",
            data,
        }

    );
}

//添加、编辑用户信息
export function addOredit (data) {
    return request(
        {
            url: "/user/edit",
            method: "post",
            data,
        }

    );
}

//客户列表
export function userList (data) {
    return request(
        {
            url: "/user/index",
            method: "post",
            data,
        }

    );
}

//删除客户
export function userDel (data) {
    return request(
        {
            url: "/user/del",
            method: "post",
            data,
        }

    );
}

//商品列表
export function goodsList (data) {
    return request(
        {
            url: "/goods/index",
            method: "post",
            data,
        }

    );
}
//商品详情
export function goodsDetail (data) {
    return request(
        {
            url: "/goods/detail",
            method: "post",
            data,
        }

    );
}

//当前用户信息
export function userOwn (data) {
    return request(
        {
            url: "/member/user_own",
            method: "post",
            data,
        }

    );
}

//修改个人信息
export function editInformation (data) {
    return request(
        {
            url: "/member/edit_information",
            method: "post",
            data,
        }

    );
}

//客户详情
export function userDetail (data) {
    return request(
        {
            url: "/user/detail",
            method: "post",
            data,
        }

    );
}

//修改密码
export function editPassword (data) {
    return request(
        {
            url: "/member/edit_password",
            method: "post",
            data,
        }

    );
}

//我的积分记录
export function myIntegralList (data) {
    return request(
        {
            url: "/member/my_integral_list",
            method: "post",
            data,
        }

    );
}

//现金兑换
export function cashExchange (data) {
    return request(
        {
            url: "/cash/cash_exchange",
            method: "post",
            data,
        }

    );
}

//现金兑换记录
export function cashExchangeList (data) {
    return request(
        {
            url: "/cash/cash_exchange_list",
            method: "post",
            data,
        }

    );
}

//代金券列表
export function coupon (data) {
    return request(
        {
            url: "/cash/coupon",
            method: "post",
            data,
        }

    );
}

//代金券兑换
export function couponExchange (data) {
    return request(
        {
            url: "/cash/coupon_exchange",
            method: "post",
            data,
        }

    );
}

//代金券兑换记录
export function couponExchangeList (data) {
    return request(
        {
            url: "/cash/coupon_exchange_list",
            method: "post",
            data,
        }

    );
}


//积分商城 立即兑换
export function orderPay (data) {
    return request(
        {
            url: "/order/pay",
            method: "post",
            data,
        }

    );
}

//当前未使用代金券
export function mycouponstatus (data) {
    return request(
        {
            url: "/order/my_coupon_status",
            method: "post",
            data,
        }

    );
}


//商品兑换记录
export function orderList (data) {
    return request(
        {
            url: "/order/order_list",
            method: "post",
            data,
        }

    );
}

//消息列表
export function messageList (data) {
    return request(
        {
            url: "/message/index",
            method: "post",
            data,
        }

    );
}


//消息详情
export function messageDetail (data) {
    return request(
        {
            url: "/message/message_detail",
            method: "post",
            data,
        }

    );
}


//提醒列表
export function remindList (data) {
    return request(
        {
            url: "/message/remind",
            method: "post",
            data,
        }

    );
}

//提醒详情
export function remindDetail (data) {
    return request(
        {
            url: "/message/remind_detail",
            method: "post",
            data,
        }

    );
}

//编辑进度
export function editStatus (data) {
    return request(
        {
            url: "/user/edit_status",
            method: "post",
            data,
        }

    );
}

//修改密码
export function editPasswords (data) {
    return request(
        {
            url: "/member/edit_password",
            method: "post",
            data,
        }

    );
}

//修该用户信息
export function editInformations (data) {
    return request(
        {
            url: "/member/edit_information",
            method: "post",
            data,
        }

    );
}


//保存头像
export function editAvatar (data) {
    return request(
        {
            url: "/member/edit_avatar",
            method: "post",
            data,
        }

    );
}

//导出
export function userexport (data) {
    return request(
        {
            url: "/user/export",
            method: "post",
            data,
        }

    );
}


//手机验证码
export function getmobileCode (data) {
    return request(
        {
            url: "/login/sendsms",
            method: "post",
            data,
        }

    );
}


//邮箱验证码
export function getemailCode (data) {
    return request(
        {
            url: "/login/send_eamil",
            method: "post",
            data,
        }

    );
}

//获取城市列表
export function getCitilist (data) {
    return request(
        {
            url: "login/city",
            method: "post",
            data,
        }

    );
}